import httpInstance from "@/utils/http.js";

export function addcardApi({skuId,count}){
    return httpInstance({
        url:'/member/cart',
        method:'POST',
        data:{
            skuId,
            count
        }
    })
}
export function getcardApi(){
    return httpInstance({
        url:'/member/cart'
    })
}
export function mergercardApi(arr){
    return httpInstance({
        url:'/member/cart/merge',
        method:'POST',
        data:arr
    })
}

export function delcardApi(ids){
    return httpInstance({
        url:'/member/cart',
        method:"delete",
        data:{
            ids
        }
    })
}

export function gaicardApi(arr){
    return httpInstance({
        url:`/member/cart/${arr.id}`,
        method:"put",
        data:{
            selected:arr.selected,
            count:arr.count
        }
    })
}